/* 我的接口 */
export default [
	
	// 测试列表
	{
	  name: "testLists",		//需要传：limit: 20,page: 1
	  url: "/shangpin/getShangPin", 
	  loading: false,			//提示加载中
	  sync: false				//同步异步
	},
	
	// 测试数据
	{
		name: 'testData',
		url: '/banner/homeBanner'
	}
	
]


import http from "@/common/request";
// 上传头像
export const upImg = ({}, data = {}) => {
	if(typeof data == 'string') data = { path: data }
	console.log(data)
  let { name, path, formData, header } = data;
  return http.upload("/Upload/fileUpload", {
    fileType: "image",
    filePath: path,
    name: name || "file",
    header,
    formData:{
			...formData,
			type: 0
	},
    loading: false,
  });
}